package top.zymall.user.mq;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author: HouZeYu
 * @Description:
 * @Date: Created in 11:26 2019/7/11
 */
@Component
public class SendMessage {
    @Autowired
    private AmqpTemplate amqpTemplate;


    public void sendMessageToMq(String message){
      amqpTemplate.convertAndSend("send.sms",message);
    }
}
